<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%order_index}}".
 *
 * @property int $ot_id
 * @property string $ot_type
 * @property int $ot_dateline
 */
class OrderIndex extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%order_index}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ot_id', 'ot_type', 'ot_dateline'], 'required'],
            [['ot_id', 'ot_dateline'], 'integer'],
            [['ot_type'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'ot_id' => Yii::t('app', 'Ot ID'),
            'ot_type' => Yii::t('app', 'Ot Type'),
            'ot_dateline' => Yii::t('app', 'Ot Dateline'),
        ];
    }
}
